description(
"Tests that DFG respects neutered typed arrays."
);

var array = new Int8Array(100);
array[0] = 42;
shouldBe("array.length", "100");
shouldBe("array[0]", "42");

function foo(array) { return array.length; }
function bar(array) { return array[0]; }

eval("// Don't compile me.");

for (var i = 0; i < 1000; ++i) {
    foo(array);
    bar(array);
}

shouldBe("foo(array)", "100");
shouldBe("bar(array)", "42");
 